Fit-O-Fine User Manual

Install Node on your machine if not present (First check if node is present by running the command “node -v” in cmd).

https://nodejs.org/en/download/

Download windows .exe to install node js in your windows system. Else you can choose distribution for your operating system.

Follow this video tutorials if you need any additional help for windows:

https://youtu.be/__7eOCxJyow

NOTE: The downloaded version must be greater or equal to LTS Version: 20.11.1 (includes npm 10.2.4)

Install Truffle Suite in System:

To install truffle suite in the system follow the below steps:

  1. In a terminal, use NPM to install Truffle : npm install -g truffle
  2. You may receive a list of warnings during installation. To confirm that Truffle was installed correctly, run : truffle version

Follow the below steps to run the application,

Steps to Install and Create wallet on Metamask :

  1. Install Metamask wallet, https://metamask.io/ click on install for chrome. After installation click on the extension, this page will open.

Figure 1:Metamask Create wallet Page

  1. Create an ‘Import wallet’. Then copy this ‘seed phrase for Metamask account to be used’ and paste it into the first cell.

Figure 2: Metamask Create wallet Page

Install and Setup Ganache:

  1. Install Ganache. Go to https://trufflesuite.com/ganache/
  2. Click on “Download Windows”.
  3. Open the downloaded file and install Ganache. After installation it will look like this:

Figure 3: Ganache Workspace creation

  1. Create a New Workspace and give it a Name. Then click Save Workspace.

Figure 4: Ganache Workspace

  1. Click on Show Key on the rightmost side of every account in the workspace that is the “KEY” symbol. Copy the “Private Key”.

Figure 5: Private Key of an Account

  1. Now go to Metamask in the browser and click on “My accounts” and “Import account”. Paste the copied private key there and import. Repeat the process at least for the first 3 accounts from the workspace.

Figure 6: Import Account

  1. Keep the workspace open in ganache. Also stay logged in to the metamask account before starting the project.

Follow the below given steps to run the Application:

  1. Download the source code from Link .
  2. Now select the downloaded zip file and then right click on it and then Extract All. This will create a Directory where all the files required to run the application are present.
  3. Go to Google AI studio
  4. Check the checkboxes

Figure 7: Google AI Studio

  1. Click get API key

Figure 8: Get API Key

  1. Click Create api key

Figure 9: Create API Key

  1. Click Create api key in new project

Figure 10: Create API in new project

  1. Copy the API key and go to the server folder and create a file named .env and create a variable in the file named GEMINI_API_KEY and paste the API key that is already copied in the last step.
    Here is a small example of the variable:-
    GEMINI_API_KEY=paste_your_api_key
  2. Go to the server folder and in the .env and paste this MONGO_DB_URL=mongodb+srv://root:root@cluster0.7yhmbar.mongodb.net/?retryWrites=true&w=majority

NOTE: we have to navigate to the root first. Then go to the server and create a text document. Paste your above two keys in the document and then save as the file and change the extension to All files and then give the file name as .env

  1. Now open terminal and navigate into the root folder that is fit-o-fine-main/fit-o-fine
  2. Then type command npm run setup and then run npm start
  3. In chrome open “http://localhost:3000” and you will see the home page of the application.

Working of the Application:

  1. Open the URL of the application ( http://localhost:3000) in your Chrome browser where we have installed metamask.

Figure 11: Organization/Admin Login Page

  1. Click on the “Org Login/ADMIN” then Metamask popup will open, asking you to connect your metamask wallet to our application. If your metamask is locked it may ask you to enter your password first, Enter your password and you are ready to use.

Figure 12: Connect to Metamask page

  1. After entering the password then click on “Connect to Metamask” button it will popup and then import the admin account and connect.

Figure 13: Admin Dashboard

  1. Now for new Organisation Registration you can choose from the previously imported Accounts or you can import another Account using the private key.

Figure 14: Copying the Private Key of an Account

Figure 15: Click on The Add Account or select another imported Account

Figure 16: Click import account

Figure 17: Paste Private Key and import

Figure 18: New Account is ready

  1. Now connect the new Account then refresh the page. Then the new organisation registration page will open.

Figure 19: New Organization Registration Page

  1. Click on Register and then fill the details and then confirm the transaction to send the request to the admin.

Figure 20: Confirm transaction to send approval request

  1. Now connect with the ADMIN account to approve or reject the request through the Approvals option and confirm the transaction.

Figure 21: Approvals Page

  1. Admin can see all the registered Organisations through the View Organisations option.

Figure 22: View Organisations Page

  1. After getting approved by the Admin the Organisation dashboard is now available for that account.

Figure 23: Organisation Dashboard

  1. In the Add Patient option new patients can be added for a particular test by selecting the test and filling the details.

Figure 24: Add Patient Page

  1. For existing patients you can check by patient id or can add new patient by “click here”
  2. Then we have to fill the details of the new patient and select the test suppose “HAEMOGLOBIN” and enter the value of the haemoglobin then click the given below add button to create the transaction and then confirm the transaction.

Figure 25: Patient details for particular test

  1. After confirming the transaction a popup will arise that the patient is added successfully.
  2. In the View Patient option it will show the test details of all patients.

Figure 26: View Patient Page

  1. In the “Search” page on the basis of 4 criterias you can search existing patients medical reports.

Figure 27: Search Page

  1. By clicking on “Report Date” you can easily fetch the reports of the tests that are held between a specific date range.

Figure 28: Search by Report Date

And search by “Test Name” or any particular parameter will show all the tests containing that parameter or having that “test Name”.

Figure 29: Search by Test Name

  1. The Patient-Login option leads to the Patient login page where the patient id and his/her corresponding gmail is required as the credentials.

Figure 30: Patient-Login Page

  1. The patient dashboard contains the test information of any particular patient.

Figure 31: Patient Dashboard

  1. The “View” button shows the report of the patient of that particular test.

Figure 32: Report Generated

  1. By clicking the download button the report can be downloaded.
  2. There is also a Chatbot facility at the bottom right corner of the Patient Dashboard.

Figure 33: Chatbot